package com.hhkj.study.admin.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@TableName(value = "x_user_listen")
@EqualsAndHashCode(callSuper = true)
@Data
public class UserListen extends UserStudyBase {

	/**
	 * 用户id,x_user表中id
	*/
	private Long userId;
	/**
	 * 视频id,关联x_resource_course_video表中id
	*/
	private Long videoId;
	/**
	 * 视频类型,字典表id
	 */
	private Long videoType;
	/**
	 * 视频总时长(s)
	*/
	private Long videoDuration;
	/**
	 * 视频已听时长(s)
	*/
	private Long listenedDuration;
	/**
	 * 子订单id
	 */
	private Long orderItemId;

	/**
	 * 课程id
	 */
	private Long courseId;

	/**
	 * 最后一次听课时长(s)
	 */
	private Long lastListenedDuration;

	/**
	 * 开始学习时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date startStudyTime;
	/**
	 * 结束学习时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endStudyTime;
	/**
	 * 视频学习状态1-学习中 2-已完成
	*/
	private Integer listeningStatus;

	/**
	 * 视频url
	 */
	@TableField(exist = false)
	private String videoUrl;

}